<?php
declare (strict_types=1);

namespace app\api\controller;

use app\common\model\AclUser;
use ffhome\frame\controller\BaseController;

class Member extends BaseController
{
    public function getProfile()
    {
        $this->json_result(AclUser::getById(currentMember()['id']));
    }

    public function setProfile()
    {
        $param = request()->param(['avatar', 'nickname']);
        AclUser::update(currentMember()['id'], $param);
        $this->success();
    }
}